package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.Vo.UserpageVo;
import com.zzyl.dto.UserlistDto;
import com.zzyl.dto.UserpageDto;
import com.zzyl.entity.User;
import com.zzyl.entity.UserRole;
import com.zzyl.vo.UserVo;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserusMapper {


    void add(User user);


    Page<UserpageVo> page(UserpageDto dto);
    
    
    @Select("select * from sys_user where email = #{email}")
    User selectByEmail(String email);

    void insert(User user1);


    List<User> liebiao(UserlistDto dto);

    @Update("update sys_user set data_state = #{status} where id = #{id}")
    void qiyongjinyong(@Param("id") Long id, @Param("status") Integer status);

    @Update("update sys_user set password = #{hashpw} where id = #{userId}")
    void mima(@Param("userId") Long userId, @Param("hashpw") String hashpw);

    void updateById(User user1);
    @Select("select * from sys_user where  username = #{username}")
    UserVo selectByName(String username);
}
